$.ajax({
    url: "http://chst.vip:1234/api/getinlanddiscount",
    success(res) {
        // console.log(data);~
        let html = ""
        let uu = document.querySelector(".info")
        res.result.forEach(item => {
            html += `<li>
                <a href="inlandproduct.html?productid=${item.productId}&title=国内折扣">
                <div class="image">${item.productImg}</div>
                <div class="title">${item.productName}</div>
                <p class="price">${item.productPrice}</p>
                <p class="form">${item.productFrom}|${item.productTime}</p>
                </a>
                </li>`
        })
        uu.innerHTML = html;
        // $('#product>.info').html(html)
         //每个li注册点击事件

         let lis = document.querySelectorAll('li');

         [...lis].forEach(li => {
             li.onclick = function () {
                 let productid = this.getAttribute("productid")
                 //点击的时候要跳转到详情页
                 location.href = `inlandproduct.html?productid=inlandproduct.html?productid=${productid}&title=国内折扣`
             }
         })
    }
});